/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2017
 */

package models.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import common.base.*;
import common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import models.model.*;
import models.dao.*;
import models.service.*;
import models.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class MltwoLevel extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "MltwoLevel";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_ENABLE = "enable";
	public static final String ALIAS_ONE_LEVEL_ID = "oneLevelId";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	@Length(max=255)
	private java.lang.String name;
	
	private java.lang.Integer enable;
	
	private java.lang.Integer oneLevelId;
	//columns END

	public MltwoLevel(){
	}

	public MltwoLevel(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setEnable(java.lang.Integer value) {
		this.enable = value;
	}
	
	public java.lang.Integer getEnable() {
		return this.enable;
	}
	public void setOneLevelId(java.lang.Integer value) {
		this.oneLevelId = value;
	}
	
	public java.lang.Integer getOneLevelId() {
		return this.oneLevelId;
	}
	
	private Set commodityss = new HashSet(0);
	public void setCommodityss(Set<Commoditys> commoditys){
		this.commodityss = commoditys;
	}
	
	public Set<Commoditys> getCommodityss() {
		return commodityss;
	}
	
	private MloneLevel mloneLevel;
	
	public void setMloneLevel(MloneLevel mloneLevel){
		this.mloneLevel = mloneLevel;
	}
	
	public MloneLevel getMloneLevel() {
		return mloneLevel;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Name",getName())
			.append("Enable",getEnable())
			.append("OneLevelId",getOneLevelId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof MltwoLevel == false) return false;
		if(this == obj) return true;
		MltwoLevel other = (MltwoLevel)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

